package Classes.GameViews.ViewPanels
{
	import Classes.GameViews.ViewScenes.VS_Main;
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.system.ApplicationDomain;
	
	/** 
	 * @author thy
	 * @version 1.0.0 
	 * 创建时间：Apr 25, 2012 7:24:23 PM 
	 */ 
	public class VP_QQTQView extends ViewPanel
	{
		private static var _instance:VP_QQTQView;
		private var _interfaceUI:Sprite;
		
		public function VP_QQTQView()
		{
			this.init();
		}
		
		private function init():void
		{
			this._interfaceUI=new (ApplicationDomain.currentDomain.getDefinition("QQVipTQ_V") as Class);
			this.addChild(this._interfaceUI);
			this.addListener();
		}
		
		private function addListener():void
		{
			this.addEventListener("close",closeHandler);
		}
		
		public function closeHandler(e:Event):void
		{
			this.close();
		}
		
		/**
		 * 打开
		 */	
		public function openQQtqWindon(lv:int,dayQQGiftObj:Object,yearObj:Object):void
		{
			this._interfaceUI["setTqData"](lv,dayQQGiftObj,yearObj);
			this.openAt(VS_Main.instance,true);
			this.toCenter();
		}
		
		public static function get instance():VP_QQTQView
		{
			if(!_instance)_instance=new VP_QQTQView();
			return _instance;
		}
		
		public function get interfaceUI():Sprite
		{
			return _interfaceUI;
		}
		
	}
}
